package cc.toprank.syncdatatask.pojo;

import com.alibaba.otter.canal.protocol.CanalEntry;

import java.io.Serializable;
import java.util.List;

public class MsgInfo implements Serializable {

	private static final long serialVersionUID = -1L;
	private String msgId;
	private String dbName;
	private Object idValue;
	private String primaryKey;
	private String tableName;
	private CanalEntry.EventType eventType;
	private List<CanalEntry.Column> columnList;
	private boolean flag;//true cloud false client
	private String sql;

	public MsgInfo() {
	}

	public String getMsgId() {
		return msgId;
	}

	public void setMsgId(String msgId) {
		this.msgId = msgId;
	}

	public String getDbName() {
		return dbName;
	}

	public void setDbName(String dbName) {
		this.dbName = dbName;
	}

	public Object getIdValue() {
		return idValue;
	}

	public void setIdValue(Object idValue) {
		this.idValue = idValue;
	}

	public String getPrimaryKey() {
		return primaryKey;
	}

	public void setPrimaryKey(String primaryKey) {
		this.primaryKey = primaryKey;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public CanalEntry.EventType getEventType() {
		return eventType;
	}

	public void setEventType(CanalEntry.EventType eventType) {
		this.eventType = eventType;
	}

	public List<CanalEntry.Column> getColumnList() {
		return columnList;
	}

	public void setColumnList(List<CanalEntry.Column> columnList) {
		this.columnList = columnList;
	}

	public boolean isFlag() {
		return flag;
	}

	public void setFlag(boolean flag) {
		this.flag = flag;
	}

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}

	@Override
	public String toString() {
		return "MsgInfo{" +
				"msgId='" + msgId + '\'' +
				", dbName='" + dbName + '\'' +
				", idValue=" + idValue +
				", primaryKey='" + primaryKey + '\'' +
				", tableName='" + tableName + '\'' +
				", eventType=" + eventType +
				", columnList=" + columnList +
				", flag=" + flag +
				", sql='" + sql + '\'' +
				'}';
	}
}
